package com.meila.cms.services;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.http.ResponseEntity;
import org.springframework.ui.Model;

import com.meila.cms.entity.AjaxObj;
import com.meila.cms.entity.MypartsLib;
import com.meila.cms.model.MyPartsModel;
import com.meila.cms.model.PartDesignModel;
import com.meila.cms.model.PartsDesignModel;
import com.meila.cms.model.PartsModel;
import com.meila.cms.model.PartsPropertyModel;
import com.meila.cms.util.page.Pager;

public interface IPartDesignService {

	Pager<PartDesignModel> findMyParts(PartDesignModel partDesignModel);

	void partDesignToAddEdit(PartsDesignModel partsDesignModel, Model model);

	List getPartList(PartsDesignModel partsDesignModel);

	List getPropertyList(PartsDesignModel partsDesignModel);

	ResponseEntity<byte[]> downloadFileBychose(String designid,
			Integer[] chose, HttpServletRequest request,
			HttpServletResponse response);

	AjaxObj updatePartDesign(PartsDesignModel partsDesignModel);

	AjaxObj addPartDesign(MyPartsModel myPartsModel);

	void partDesignToAdd(MyPartsModel myPartsModel, Model model);

	List getMyPartList(MyPartsModel myPartsModel);

	List getMyPropertyList(MyPartsModel myPartsModel);

	AjaxObj updateMyPartDesign(MyPartsModel myPartsModel);

	AjaxObj update(MypartsLib mypartsLib);

	ResponseEntity<byte[]> dowloadFileBychoseFromParts(String designid,
			Integer[] chose, HttpServletRequest request,
			HttpServletResponse response);

	AjaxObj addMyPart(PartsDesignModel partsDesignModel);

	AjaxObj delPartDesign(PartDesignModel partDesignModel);

	AjaxObj whetherToAdd(PartDesignModel partDesignModel);

	AjaxObj designameVerify(PartDesignModel partDesignModel);

	AjaxObj designameVerifyInNewDesign(PartDesignModel partDesignModel);

	AjaxObj updateMemory(Integer[] fileids, Boolean isupdate);

}